package com.hotleproject.service.impl;
import com.hotleproject.mapper.UsersMapper;
import com.hotleproject.pojo.Users;
import com.hotleproject.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UsersServiceImpl implements UsersService {

    @Autowired
    private UsersMapper usersMapper;

    @Override
    public void addUser(Users users) {
        this.usersMapper.insertUser(users);
    }
//
//    @Override
//    public List<Users> findUserAll() {
//        return this.usersMapper.selectUsersAll();
//    }
////4.修改业务层代码
    @Override
    public Users findUserById(String username,String password) {

        return this.usersMapper.selectUserById(username,password);
    }

    @Override
    public String findPhoneByUser(String username) {
        return this.usersMapper.selectPhoneByUser(username);
    }
//
//    @Override
//    public void updateUser(Users users) {
//       this.usersMapper.updateUser(users);
//    }
//
//    @Override
//    public void deleteUserById(Integer id) {
//        this.usersMapper.deleteUserById(id);
//    }


}
